In This Topic
When printing in the network, keep the following two points in mind:
- Preview files are usually created in the same directory as the project file by the name of the project file and the extension "LL". If two users want to print the same file to preview, the second user receives an error message. This can be avoided by setting LlPreviewSetTempPath (see example below).
- The same applies for printer settings files. These also will – with the currently selected extension – be searched for or created in the directory of the project file. LlSetPrinterDefaultsDir should be used here.
using (ListLabel LL = new ListLabel())
{
// Define/Assign data source
LL.DataSource = CreateDataSet();
// Set local temporary path
LL.Core.LlPreviewSetTempPath(Path.GetTempPath());
// Printer settings should be created in user-specific sub directory
// so changes will be stored permanently
LL.Core.LlSetPrinterDefaultsDir("<Path>");
// Print
LL.Print();
}
Using LL As New ListLabel()
' Define/Assign data source
LL.DataSource = CreateDataSet()
' Set local temporary path
LL.Core.LlPreviewSetTempPath(Path.GetTempPath())
' Printer settings should be created in user-specific sub directory
' so changes will be stored permanently
LL.Core.LlSetPrinterDefaultsDir("<Path>")
' Print
LL.Print()
End Using
Using the stream overloads of the Print and Design methods is an alternative here. These, for example, "automatically” take care of storing the printer settings in the passed stream. Hints as well as an example can be found in section Store Project Files in a Database.